<template>
    <div class="not-found">
      <div class="content">
        <h1>404 Not Found</h1>
        <p>对不起，您请求的页面不存在。</p>
        <router-link to="/" class="home-link">返回首页</router-link>
      </div>
    </div>
  </template>
  
  <script setup>
  import { useRouter } from 'vue-router';
  
  const router = useRouter();
  
  // 可以添加一些逻辑，例如自动跳转到首页
  setTimeout(() => {
    router.push('/');
  }, 5000); // 5秒后自动跳转到首页
  </script>
  
  <style scoped>
  .not-found {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
  }
  
  .content {
    text-align: center;
  }
  
  h1 {
    font-size: 3rem;
    color: #343a40;
    margin-bottom: 20px;
  }
  
  p {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 30px;
  }
  
  .home-link {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1.2rem;
    color: white;
    background-color: #007bff;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
  }
  
  .home-link:hover {
    background-color: #0056b3;
  }
  </style>